import request from '../index';

const baseUrl = '/base-server';
const financeUrl = '/finance-server';

// 查询所有渠道
export const queryAllChannel = (params: any) => {
  return request({
    url: `${baseUrl}/channel/queryAllChannel`,
    params: { form: params },
  });
};

// 查询所有企业
export const queryAllCompany = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryAllCompany`,
    params: { form: params },
  });
};

// 查询所有企业
export const queryBusAndStation = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryBusAndStation`,
    params: { form: params },
  });
};

// 查询所有电站运营商
export const selectAllOperatorList = (params: any) => {
  return request({
    url: `${baseUrl}/org/selectAllOperatorList`,
    params: { form: params },
  });
};

// 模糊查询所有车辆机构
export const queryCarList = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryCarList`,
    params: { form: params },
  });
};

// 标签树
export const queryLabelListByName = (params: any) => {
  return request({
    url: `${baseUrl}/label/queryLabelListByName`,
    params: { form: params },
  });
};

// 选择电站[树形结构]   运营商-电站
export const stationTreeData = (params: any) => {
  return request({
    url: `${baseUrl}/auth/stationTreeData`,
    params: { form: params },
  });
};

//选择单独计价电桩[树形结构]   运营商-电站-电桩
export const equipmentTreeData = (params: any) => {
  return request({
    url: `${baseUrl}/equipment/equipmentTreeData`,
    params: { form: params },
  });
};

//车辆机构[树形结构]   运营商-车辆机构
export const queryVehicle = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryVehicle`,
    params: { form: params },
  });
};
export const queryVehicleWhite = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryVehicleWhite`,
    params: { form: params },
  });
};


//电站数据-选择企业[树形结构]  企业
export const orgTreeData = (params: any) => {
  return request({
    url: `${baseUrl}/auth/orgTreeData`,
    params: { form: params },
  });
};

//用户数据-选择企业[树形结构]  企业
export const userOrgTreeData = (params: any) => {
  return request({
    url: `${baseUrl}/auth/userOrgTreeData`,
    params: { form: params },
  });
};

//分润数据-选择分润[树形机构]  分润
export const getShareProfitTree = (params: any) => {
  return request({
    url: `${financeUrl}/shareProfit/getShareProfitTree`,
    params: { form: params },
  });
};

//分润数据-选择企业[树形机构]  分润
export const shareTreeData = (params: any) => {
  return request({
    url: `${baseUrl}/auth/shareTreeData`,
    params: { form: params },
  });
};

// 白名单-选择电站[树形结构]   运营商-电站
export const stationTreeDataByChannel = (params: any) => {
  return request({
    url: `${baseUrl}/station/stationTreeDataByChannelIdOrOrgId`,
    params: { form: params },
  });
};
 
// 查询互联互通 流量方 监管平台
export const queryAllFlow = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryAllFlow`,
    params: { form: params },
  });
};

// 区域树 电站树
export const areaStationTreeDataByOrgId = (params: any) => {
  return request({
    url: `${baseUrl}/station/areaStationTreeDataByOrgId`,
    params: { form: params },
  });
};

// 选择电桩[树形结构]
export const equipmentTreeDataNoPriceSet = (params: any) => {
  return request({
    url: `${baseUrl}/equipment/equipmentTreeDataNoPriceSet`,
    params: { form: params },
  });
};

// 获取所有企业下的机构
export const queryAllInst = (params: any) => {
  return request({
    url: `${baseUrl}/org/queryAllInst`,
    params: { form: params },
  });
};
